/**
 * Created by Jacky.Gao on 2017-01-25.
 */
import Tool from './Tool.js';
import { setDirty } from '../Utils.js';
import SearchFormDialog from '../dialog/SearchFormDialog.js';

export default class SearchFormSwitchTool extends Tool {
  constructor(context) {
    super(context);
    this.dialog = new SearchFormDialog();
  }
  execute() {
    setDirty();
    this.dialog.show(this.context.reportDef);
  }
  getTitle() {
    return `${window.i18n.tools.searchFormSwitch}`;
  }
  getIcon() {
    return `<div class="btn-group"><button type="button" class="btn btn-default"
    style="border:none;border-radius:0;text-align: center;padding:0;"><i class="icon-ym icon-ym-report-icon-search-setting"></i></button></div>`;
  }
}